package store.model;

import store.util.MyList;

/**
 * 账号信息
 */
public class Account {

    /**
     * 手机号
     */
    private String phone;

    /**
     * 密码
     */
    private String password;

    /**
     * 购物车
     */
    private MyList shopCar;



    public Account(String phone, String password){
        this.phone = phone;
        this.password = password;
    }

    public boolean login(Account account) {
        if (this.getPhone().equals(account.getPhone()) && this.getPassword().equals(account.getPassword())){
            return true;
        }
        return false;
    }


    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public MyList getShopCar() {
        return shopCar;
    }

    public void setShopCar(MyList shopCar) {
        this.shopCar = shopCar;
    }
}
